---
title: Vector stores
---

A [vector store](/oss/concepts/#vectorstores) stores [embedded](/oss/concepts/embedding_models) data and performs similarity search.

<Tabs>
<Tab title="OpenAI">

#### Install dependencies

<Tabs>
<Tab title="npm">

```bash
npm i @langchain/openai
```

</Tab>
<Tab title="yarn">

```bash
yarn add @langchain/openai
```

</Tab>
<Tab title="pnpm">

```bash
pnpm add @langchain/openai
```

</Tab>
</Tabs>

#### Add environment variables

```bash
OPENAI_API_KEY=your-api-key
```

#### Instantiate the model

```typescript
import { OpenAIEmbeddings } from "@langchain/openai";

const embeddings = new OpenAIEmbeddings({
  model: "text-embedding-3-large"
});
```

</Tab>
<Tab title="Azure">

#### Install dependencies

<Tabs>
<Tab title="npm">

```bash
npm i @langchain/openai
```

</Tab>
<Tab title="yarn">

```bash
yarn add @langchain/openai
```

</Tab>
<Tab title="pnpm">

```bash
pnpm add @langchain/openai
```

</Tab>
</Tabs>

#### Add environment variables

```bash
AZURE_OPENAI_API_INSTANCE_NAME=<YOUR_INSTANCE_NAME>
AZURE_OPENAI_API_KEY=<YOUR_KEY>
AZURE_OPENAI_API_VERSION="2024-02-01"
```

#### Instantiate the model

```typescript
import { AzureOpenAIEmbeddings } from "@langchain/openai";

const embeddings = new AzureOpenAIEmbeddings({
  azureOpenAIApiEmbeddingsDeploymentName: "text-embedding-ada-002"
});
```

</Tab>
<Tab title="AWS">

#### Install dependencies

<Tabs>
<Tab title="npm">

```bash
npm i @langchain/aws
```

</Tab>
<Tab title="yarn">

```bash
yarn add @langchain/aws
```

</Tab>
<Tab title="pnpm">

```bash
pnpm add @langchain/aws
```

</Tab>
</Tabs>

#### Add environment variables

```bash
BEDROCK_AWS_REGION=your-region
```

#### Instantiate the model

```typescript
import { BedrockEmbeddings } from "@langchain/aws";

const embeddings = new BedrockEmbeddings({
  model: "amazon.titan-embed-text-v1"
});
```

</Tab>
<Tab title="VertexAI">

#### Install dependencies

<Tabs>
<Tab title="npm">

```bash
npm i @langchain/google-vertexai
```

</Tab>
<Tab title="yarn">

```bash
yarn add @langchain/google-vertexai
```

</Tab>
<Tab title="pnpm">

```bash
pnpm add @langchain/google-vertexai
```

</Tab>
</Tabs>

#### Add environment variables

```bash
GOOGLE_APPLICATION_CREDENTIALS=credentials.json
```

#### Instantiate the model

```typescript
import { VertexAIEmbeddings } from "@langchain/google-vertexai";

const embeddings = new VertexAIEmbeddings({
  model: "gemini-embedding-001"
});
```

</Tab>
<Tab title="MistralAI">

#### Install dependencies

<Tabs>
<Tab title="npm">

```bash
npm i @langchain/mistralai
```

</Tab>
<Tab title="yarn">

```bash
yarn add @langchain/mistralai
```

</Tab>
<Tab title="pnpm">

```bash
pnpm add @langchain/mistralai
```

</Tab>
</Tabs>

#### Add environment variables

```bash
MISTRAL_API_KEY=your-api-key
```

#### Instantiate the model

```typescript
import { MistralAIEmbeddings } from "@langchain/mistralai";

const embeddings = new MistralAIEmbeddings({
  model: "mistral-embed"
});
```

</Tab>
<Tab title="Cohere">

#### Install dependencies

<Tabs>
<Tab title="npm">

```bash
npm i @langchain/cohere
```

</Tab>
<Tab title="yarn">

```bash
yarn add @langchain/cohere
```

</Tab>
<Tab title="pnpm">

```bash
pnpm add @langchain/cohere
```

</Tab>
</Tabs>

#### Add environment variables

```bash
COHERE_API_KEY=your-api-key
```

#### Instantiate the model

```typescript
import { CohereEmbeddings } from "@langchain/cohere";

const embeddings = new CohereEmbeddings({
  model: "embed-english-v3.0"
});
```

</Tab>
</Tabs>

<Tabs>
<Tab title="Memory">

#### Install dependencies

<Tabs>
<Tab title="npm">

```bash
npm i langchain
```

</Tab>
<Tab title="yarn">

```bash
yarn add langchain
```

</Tab>
<Tab title="pnpm">

```bash
pnpm add langchain
```

</Tab>
</Tabs>

```typescript
import { MemoryVectorStore } from "langchain/vectorstores/memory";

const vectorStore = new MemoryVectorStore(embeddings);
```

</Tab>
<Tab title="Chroma">

#### Install dependencies

<Tabs>
<Tab title="npm">

```bash
npm i @langchain/community
```

</Tab>
<Tab title="yarn">

```bash
yarn add @langchain/community
```

</Tab>
<Tab title="pnpm">

```bash
pnpm add @langchain/community
```

</Tab>
</Tabs>

```typescript
import { Chroma } from "@langchain/community/vectorstores/chroma";

const vectorStore = new Chroma(embeddings, {
  collectionName: "a-test-collection",
});
```

</Tab>
<Tab title="FAISS">

#### Install dependencies

<Tabs>
<Tab title="npm">

```bash
npm i @langchain/community
```

</Tab>
<Tab title="yarn">

```bash
yarn add @langchain/community
```

</Tab>
<Tab title="pnpm">

```bash
pnpm add @langchain/community
```

</Tab>
</Tabs>

```typescript
import { FaissStore } from "@langchain/community/vectorstores/faiss";

const vectorStore = new FaissStore(embeddings, {});
```

</Tab>
<Tab title="MongoDB">

#### Install dependencies

<Tabs>
<Tab title="npm">

```bash
npm i @langchain/mongodb
```

</Tab>
<Tab title="yarn">

```bash
yarn add @langchain/mongodb
```

</Tab>
<Tab title="pnpm">

```bash
pnpm add @langchain/mongodb
```

</Tab>
</Tabs>

```typescript
import { MongoDBAtlasVectorSearch } from "@langchain/mongodb"
import { MongoClient } from "mongodb";

const client = new MongoClient(process.env.MONGODB_ATLAS_URI || "");
const collection = client
  .db(process.env.MONGODB_ATLAS_DB_NAME)
  .collection(process.env.MONGODB_ATLAS_COLLECTION_NAME);

const vectorStore = new MongoDBAtlasVectorSearch(embeddings, {
  collection,
  indexName: "vector_index",
  textKey: "text",
  embeddingKey: "embedding",
});
```

</Tab>
<Tab title="PGVector">

#### Install dependencies

<Tabs>
<Tab title="npm">

```bash
npm i @langchain/community
```

</Tab>
<Tab title="yarn">

```bash
yarn add @langchain/community
```

</Tab>
<Tab title="pnpm">

```bash
pnpm add @langchain/community
```

</Tab>
</Tabs>

```typescript
import { PGVectorStore } from "@langchain/community/vectorstores/pgvector";

const vectorStore = await PGVectorStore.initialize(embeddings, {});
```

</Tab>
<Tab title="Pinecone">

#### Install dependencies

<Tabs>
<Tab title="npm">

```bash
npm i @langchain/pinecone
```

</Tab>
<Tab title="yarn">

```bash
yarn add @langchain/pinecone
```

</Tab>
<Tab title="pnpm">

```bash
pnpm add @langchain/pinecone
```

</Tab>
</Tabs>

```typescript
import { PineconeStore } from "@langchain/pinecone";
import { Pinecone as PineconeClient } from "@pinecone-database/pinecone";

const pinecone = new PineconeClient();
const vectorStore = new PineconeStore(embeddings, {
  pineconeIndex,
  maxConcurrency: 5,
});
```

</Tab>
<Tab title="Qdrant">

#### Install dependencies

<Tabs>
<Tab title="npm">

```bash
npm i @langchain/qdrant
```

</Tab>
<Tab title="yarn">

```bash
yarn add @langchain/qdrant
```

</Tab>
<Tab title="pnpm">

```bash
pnpm add @langchain/qdrant
```

</Tab>
</Tabs>

```typescript
import { QdrantVectorStore } from "@langchain/qdrant";

const vectorStore = await QdrantVectorStore.fromExistingCollection(embeddings, {
  url: process.env.QDRANT_URL,
  collectionName: "langchainjs-testing",
});
```

</Tab>
</Tabs>

LangChain.js integrates with a variety of vector stores. You can check out a full list below:

## All vector stores

<Columns cols={3}>
  <Card
    title="AnalyticDB"
    icon="link"
    href="/oss/integrations/vectorstores/analyticdb"
    arrow="true"
    cta="View guide"
  >
  </Card>
  <Card
    title="Astra DB"
    icon="link"
    href="/oss/integrations/vectorstores/astradb"
    arrow="true"
    cta="View guide"
  >
  </Card>
  <Card
    title="Azion EdgeSQL"
    icon="link"
    href="/oss/integrations/vectorstores/azion-edgesql"
    arrow="true"
    cta="View guide"
  >
  </Card>
  <Card
    title="Azure AI Search"
    icon="link"
    href="/oss/integrations/vectorstores/azure_aisearch"
    arrow="true"
    cta="View guide"
  >
  </Card>
  <Card
    title="Azure Cosmos DB for MongoDB vCore"
    icon="link"
    href="/oss/integrations/vectorstores/azure_cosmosdb_mongodb"
    arrow="true"
    cta="View guide"
  >
  </Card>
  <Card
    title="Azure Cosmos DB for NoSQL"
    icon="link"
    href="/oss/integrations/vectorstores/azure_cosmosdb_nosql"
    arrow="true"
    cta="View guide"
  >
  </Card>
  <Card
    title="Cassandra"
    icon="link"
    href="/oss/integrations/vectorstores/cassandra"
    arrow="true"
    cta="View guide"
  >
  </Card>
  <Card
    title="Chroma"
    icon="link"
    href="/oss/integrations/vectorstores/chroma"
    arrow="true"
    cta="View guide"
  >
  </Card>
  <Card
    title="ClickHouse"
    icon="link"
    href="/oss/integrations/vectorstores/clickhouse"
    arrow="true"
    cta="View guide"
  >
  </Card>
  <Card
    title="CloseVector"
    icon="link"
    href="/oss/integrations/vectorstores/closevector"
    arrow="true"
    cta="View guide"
  >
  </Card>
  <Card
    title="Cloudflare Vectorize"
    icon="link"
    href="/oss/integrations/vectorstores/cloudflare_vectorize"
    arrow="true"
    cta="View guide"
  >
  </Card>
  <Card
    title="Convex"
    icon="link"
    href="/oss/integrations/vectorstores/convex"
    arrow="true"
    cta="View guide"
  >
  </Card>
  <Card
    title="Couchbase"
    icon="link"
    href="/oss/integrations/vectorstores/couchbase"
    arrow="true"
    cta="View guide"
  >
  </Card>
  <Card
    title="Elasticsearch"
    icon="link"
    href="/oss/integrations/vectorstores/elasticsearch"
    arrow="true"
    cta="View guide"
  >
  </Card>
  <Card
    title="Faiss"
    icon="link"
    href="/oss/integrations/vectorstores/faiss"
    arrow="true"
    cta="View guide"
  >
  </Card>
  <Card
    title="Google Cloud SQL for PostgreSQL"
    icon="link"
    href="/oss/integrations/vectorstores/google_cloudsql_pg"
    arrow="true"
    cta="View guide"
  >
  </Card>
  <Card
    title="Google Vertex AI Matching Engine"
    icon="link"
    href="/oss/integrations/vectorstores/googlevertexai"
    arrow="true"
    cta="View guide"
  >
  </Card>
  <Card
    title="SAP HANA Cloud Vector Engine"
    icon="link"
    href="/oss/integrations/vectorstores/hanavector"
    arrow="true"
    cta="View guide"
  >
  </Card>
  <Card
    title="HNSWLib"
    icon="link"
    href="/oss/integrations/vectorstores/hnswlib"
    arrow="true"
    cta="View guide"
  >
  </Card>
  <Card
    title="LanceDB"
    icon="link"
    href="/oss/integrations/vectorstores/lancedb"
    arrow="true"
    cta="View guide"
  >
  </Card>
  <Card
    title="libSQL"
    icon="link"
    href="/oss/integrations/vectorstores/libsql"
    arrow="true"
    cta="View guide"
  >
  </Card>
  <Card
    title="MariaDB"
    icon="link"
    href="/oss/integrations/vectorstores/mariadb"
    arrow="true"
    cta="View guide"
  >
  </Card>
  <Card
    title="In-memory"
    icon="link"
    href="/oss/integrations/vectorstores/memory"
    arrow="true"
    cta="View guide"
  >
  </Card>
  <Card
    title="Milvus"
    icon="link"
    href="/oss/integrations/vectorstores/milvus"
    arrow="true"
    cta="View guide"
  >
  </Card>
  <Card
    title="Momento Vector Index (MVI)"
    icon="link"
    href="/oss/integrations/vectorstores/momento_vector_index"
    arrow="true"
    cta="View guide"
  >
  </Card>
  <Card
    title="MongoDB Atlas"
    icon="link"
    href="/oss/integrations/vectorstores/mongodb_atlas"
    arrow="true"
    cta="View guide"
  >
  </Card>
  <Card
    title="MyScale"
    icon="link"
    href="/oss/integrations/vectorstores/myscale"
    arrow="true"
    cta="View guide"
  >
  </Card>
  <Card
    title="Neo4j Vector Index"
    icon="link"
    href="/oss/integrations/vectorstores/neo4jvector"
    arrow="true"
    cta="View guide"
  >
  </Card>
  <Card
    title="Neon Postgres"
    icon="link"
    href="/oss/integrations/vectorstores/neon"
    arrow="true"
    cta="View guide"
  >
  </Card>
  <Card
    title="OpenSearch"
    icon="link"
    href="/oss/integrations/vectorstores/opensearch"
    arrow="true"
    cta="View guide"
  >
  </Card>
  <Card
    title="PGVector"
    icon="link"
    href="/oss/integrations/vectorstores/pgvector"
    arrow="true"
    cta="View guide"
  >
  </Card>
  <Card
    title="Pinecone"
    icon="link"
    href="/oss/integrations/vectorstores/pinecone"
    arrow="true"
    cta="View guide"
  >
  </Card>
  <Card
    title="Prisma"
    icon="link"
    href="/oss/integrations/vectorstores/prisma"
    arrow="true"
    cta="View guide"
  >
  </Card>
  <Card
    title="Qdrant"
    icon="link"
    href="/oss/integrations/vectorstores/qdrant"
    arrow="true"
    cta="View guide"
  >
  </Card>
  <Card
    title="Redis"
    icon="link"
    href="/oss/integrations/vectorstores/redis"
    arrow="true"
    cta="View guide"
  >
  </Card>
  <Card
    title="Rockset"
    icon="link"
    href="/oss/integrations/vectorstores/rockset"
    arrow="true"
    cta="View guide"
  >
  </Card>
  <Card
    title="SingleStore"
    icon="link"
    href="/oss/integrations/vectorstores/singlestore"
    arrow="true"
    cta="View guide"
  >
  </Card>
  <Card
    title="Supabase"
    icon="link"
    href="/oss/integrations/vectorstores/supabase"
    arrow="true"
    cta="View guide"
  >
  </Card>
  <Card
    title="Tigris"
    icon="link"
    href="/oss/integrations/vectorstores/tigris"
    arrow="true"
    cta="View guide"
  >
  </Card>
  <Card
    title="Turbopuffer"
    icon="link"
    href="/oss/integrations/vectorstores/turbopuffer"
    arrow="true"
    cta="View guide"
  >
  </Card>
  <Card
    title="TypeORM"
    icon="link"
    href="/oss/integrations/vectorstores/typeorm"
    arrow="true"
    cta="View guide"
  >
  </Card>
  <Card
    title="Typesense"
    icon="link"
    href="/oss/integrations/vectorstores/typesense"
    arrow="true"
    cta="View guide"
  >
  </Card>
  <Card
    title="Upstash Vector"
    icon="link"
    href="/oss/integrations/vectorstores/upstash"
    arrow="true"
    cta="View guide"
  >
  </Card>
  <Card
    title="USearch"
    icon="link"
    href="/oss/integrations/vectorstores/usearch"
    arrow="true"
    cta="View guide"
  >
  </Card>
  <Card
    title="Vectara"
    icon="link"
    href="/oss/integrations/vectorstores/vectara"
    arrow="true"
    cta="View guide"
  >
  </Card>
  <Card
    title="Vercel Postgres"
    icon="link"
    href="/oss/integrations/vectorstores/vercel_postgres"
    arrow="true"
    cta="View guide"
  >
  </Card>
  <Card
    title="Voy"
    icon="link"
    href="/oss/integrations/vectorstores/voy"
    arrow="true"
    cta="View guide"
  >
  </Card>
  <Card
    title="Weaviate"
    icon="link"
    href="/oss/integrations/vectorstores/weaviate"
    arrow="true"
    cta="View guide"
  >
  </Card>
  <Card
    title="Xata"
    icon="link"
    href="/oss/integrations/vectorstores/xata"
    arrow="true"
    cta="View guide"
  >
  </Card>
  <Card
    title="Zep Open Source"
    icon="link"
    href="/oss/integrations/vectorstores/zep"
    arrow="true"
    cta="View guide"
  >
  </Card>
  <Card
    title="Zep Cloud"
    icon="link"
    href="/oss/integrations/vectorstores/zep_cloud"
    arrow="true"
    cta="View guide"
  >
  </Card>
</Columns>
